<?php
namespace Admin\Controller;
use Common\Controller\AdminBaseController;
class IndexController extends AdminBaseController {
    public function index(){
    	$list = D('menu') -> getNavlist();
    	$this -> assign('list',$list);
        $this->display();
    }
    public function main(){
    	$this -> display();
    }

    public function upload(){
		if(IS_POST || IS_AJAX){
			$imgPath = uploadFiles($_FILES['file'],'Upload/images/');
			if(is_array($imgPath)){
				$this -> ajaxReturn($imgPath);
			}
			$this -> ajaxReturn(['status' => 1, 'mess' => '成功','data' => $imgPath]); 
		}
		
	}



 
}